package core.model.mail;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Context implements Serializable{

    private int turn;

    private List<Message> broadcasts = new ArrayList<Message>();
    private List<Message> privates = new ArrayList<Message>();

    public void addMessage(Message message, Message.MessageType type) {
        if (Message.MessageType.BROADCAST == type) {
            broadcasts.add(message);
        }

        if (Message.MessageType.PRIVATE == type) {
            privates.add(message);
        }
    }

    public int getTurn() {
        return turn;
    }

    public void setTurn(int turn) {
        this.turn = turn;
    }

    public List<Message> getBroadcasts() {
        return broadcasts;
    }

    public void setBroadcasts(List<Message> broadcasts) {
        this.broadcasts = broadcasts;
    }

    public List<Message> getPrivates() {
        return privates;
    }

    public void setPrivates(List<Message> privates) {
        this.privates = privates;
    }
}